
#include "ClientNetSocket.h"
#ifndef CLIENTSOCKETMGR_H_WIN32
#define CLIENTSOCKETMGR_H_WIN32

namespace Apo
{
	class ClientNetSocket;
	class  ClientSocketMgr 
	{
	public:
		ClientSocketMgr();
		~ClientSocketMgr();
		void init(ClientNetSocket	* pClientNetSocket);
		bool ConnectServer(const char * Address = "127.0.0.1", uint32 Port = 3724);
		bool LoginServer(const char * username = "weihongbing",
			const char * password = "1123456");
		bool UnLoginServer();
		void Release();
		ClientNetSocket * getClientNetSocket() { return  m_ClientNetSocket;};
		long threadcount;

	private:

		ClientNetSocket	*  m_ClientNetSocket;
	};

	extern ClientSocketMgr	 		 gclientSocketMgr ;


	class ClientSocketWorkerThread : public ThreadBase
	{
	public:
		void run();
	};

	
	class  WorkerThread : public ThreadBase
	{
	public:
		void run();
	};



}
#endif